extends layout

block content
  h1=title

  //- Flash 成功消息
  if success && success.length > 0
    .alert.alert-success
      ul.mb-0
        each msg in success
          li #{msg}

  //- Flash 错误消息
  if error && error.length > 0
    .alert.alert-danger
      ul.mb-0
        each msg in error
          li #{msg}

  //- 验证错误消息
  if errors && errors.length > 0
    .alert.alert-danger
      ul.mb-0
        each err in errors
          li #{err.msg}

  form(method='post', action='/api/categories/add')
    .form-group
      label Title:
      input.form-control(name='title', type='text')
    input.btn.btn-default(name='submit', value='Save', type='submit')
